<template>
  <div id="app">
    <router-view></router-view>
    <menu-com v-if="show"></menu-com>
  </div>
</template>

<script>
var ua = navigator.userAgent.toLowerCase();
var isWeixin = ua.indexOf("micromessenger") != -1;
if (!isWeixin) {
  window.location.href =
    "https://open.weixin.qq.com/connect/oauth2/authorize?appid=wx16e67a0382684644";
}
import MenuCom from "./components/MenuCom.vue";

export default {
  name: "app",
  components: {
    MenuCom
  },
  data() {
    return {
      show: true
    };
  },
  watch: {
    $route: function() {
      var name = this.$route.name;
      var that = this;
      switch (name) {
        // case "sub":
        //     that.show = false;
        //     break;
        // case "contract":
        //     that.show = false;
        //     break;
        // case "deviation":
        //     that.show = false;
        //     break;
        // case "more":
        //     that.show = false;
        //     break;
        // case "strategy":
        //     that.show = false;
        //     break;
        // case "height":
        //     that.show = false;
        //     break;
        // case "noData":
        //     that.show = false;
        //     break;
        // case "tabContent":
        //     that.show = false;
        //     break;
        // case "Edit":
        //     that.show = false;
        //     break;
        // case "Search":
        //     that.show = false;
        //     break;
        // case "share":
        //     that.show = false;
        //     break;
        // case "pay":
        //     that.show = false;
        //     break;
        // case "contact":
        //     that.show = false;
        //     break;
        // case "integral":
        //     that.show = false;
        //     break;
        // case "detail":
        //     that.show = false;
        //     break;
        // case "server":
        //     that.show = false;
        //     break;
        // case "number":
        //     that.show = false;
        //     break;
        // case "recharge":
        //     that.show = false;
        //     break;
        case "homes":
          that.show = true;
          break;
        case "home":
          that.show = true;
          break;
        case "my":
          that.show = true;
          break;
        case "live":
          that.show = true;
          break;
        case "message":
          that.show = true;
          break;
        case "index":
          that.show = true;
          break;
        case "MsgnoData":
          that.show = true;
          break;
        case "list":
          that.show = true;
          break;
        default:
          that.show = false;
      }
    }
  }
};
</script>

<style>
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /*text-align: center;*/
  /*color: #2c3e50;*/
  /*margin-top: 60px;*/
}
body {
  background: rgb(247, 247, 247, 1);
}
ul,
li,
p {
  margin: 0;
  padding: 0;
}
* {
  box-sizing: border-box;
}
html {
  line-height: initial !important;
}

html {
  font-size: 16px !important;
}
@media only screen and (min-width: 320px) {
  html {
    font-size: 12.36714px !important;
  }
}
@media only screen and (min-width: 350px) {
  html {
    font-size: 13.52657px !important;
  }
}
@media only screen and (min-width: 375px) {
  html {
    font-size: 14.4927px !important;
  }
}
@media only screen and (min-width: 400px) {
  html {
    font-size: 15.4589372px !important;
  }
}
@media only screen and (min-width: 414px) {
  html {
    font-size: 16px !important;
  }
}
@media only screen and (min-width: 430px) {
  html {
    font-size: 16.618px !important;
  }
}
@media only screen and (min-width: 450px) {
  html {
    font-size: 17.3913px !important;
  }
}
@media only screen and (min-width: 480px) {
  html {
    font-size: 18.5507px !important;
  }
}
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
html {
  font-family: sans-serif;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}
</style>
